// created by noellynch
// Jun 5, 2009

package com.sceneworker.app.help;

import java.util.Hashtable;

import com.sceneworker.util.xml.BaseTag;
import com.sceneworker.util.xml.TagCallBackLoader;
import com.sceneworker.util.xml.TagCallback;

public class TopicTag implements TagCallback {

	private		HelpPanel.HelpTopic		mcl_topic;
	
	public TopicTag() {
	}

	public void handleEnd(TagCallBackLoader cl_loader, String str_data) {
		((HelpPanel)cl_loader.getCurrentDataSink()).addTopic(mcl_topic);
	}

	public void handleStart(TagCallBackLoader cl_loader,
			Hashtable<String, String> cla_attrs) {
		mcl_topic = ((HelpPanel)cl_loader.getCurrentDataSink()).newHelpTopic();
		BaseTag.attributeParse(cl_loader, cla_attrs, this);
	}
	
	public	void	attrSet_name(String str_name) {
		mcl_topic.mstr_title = str_name;
	}
	
	public	void	attrSet_location(String str_location) {
		mcl_topic.mstr_location = str_location;
	}

}
